import request from '@/utils/request'
import * as proxy from '@/constants/proxy'

//新增数据
export function getAdd(data: any) {
    return request({
        url: proxy.CHECC_API_CMS + '/kjsl/cooperate/add',
        method: 'post',
        data
    })
}

//修改数据
export function getUpdate(data: any) {
    return request({
        url: proxy.CHECC_API_CMS + '/kjsl/cooperate/update',
        method: 'post',
        data
    })
}

// 列表数据
export function getList(data: any) {
    return request({
        url: proxy.CHECC_API_CMS + '/kjsl/cooperate/list',
        method: 'post',
        data
    })
}

//关联项目
export function addFiles(data: any) {
    return request({
        url: '/kjsl/cooperate/addProject',
        method: 'post',
        data
    })
}

//取消项目关联
export function delectProject(id: any) {
    return request({
      url: proxy.CHECC_API_CMS + `/kjsl/cooperate/disAssociation/project/${id}`,
      method: 'get'
    })
  }
  

//获取详情
export function getDetail(id: any) {
    return request({
        url: proxy.CHECC_API_CMS + `/kjsl/cooperate/getDetailById/${id}`,
        method: 'get',
    })
}

//批量删除数据
export function getDelect(ids: any) {
    return request({
        url: proxy.CHECC_API_CMS + `/kjsl/cooperate/${ids}`,
        method: 'delete',
    })
}
